<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div id="rvimsTreeMenu"></div>
<div id="rvimsTreeMenuData"></div>

<script type="text/javascript">
	$("#rvimsTreeMenuData").data("-1","0");
<c:forEach items="${treeViewData}" var="node">
	$("#rvimsTreeMenuData").data("${node.code}","${node.id}");
</c:forEach>

	var dataset = [{
	    "root": [
			<c:forEach items="${treeViewData}" var="node">
	          {
	              "id": $("#rvimsTreeMenuData").data("${node.code}"),
	              "name": "${node.name}",
	              "parentid": $("#rvimsTreeMenuData").data("${node.parentcode}")
	          },
			</c:forEach>
				{
					"id": 0,
	              "name": "0",
	              "parentid": 0
				}
			]
	  }];
	  
	$("#rvimsTreeMenu").btechcotree({
	    containerid: "rvimsTreeMenu"
	   , dataset: dataset
	   , datatype: $treedatatype.Json
	   , dataformat: $treedataformat.Linear
	});
</script>
